AUTOMAKE_OPTIONS = subdir-objects

ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS}

AM_CXXFLAGS = @AM_CXXFLAGS@ $(PG_CPPFLAGS) -I$(PG_INCLUDE)

AM_LDFLAGS = -DBUILDING_EXAMPLE_DLL @AM_LDFLAGS@ $(PG_LDFLAGS) $(LIBPQ_libs)

lib_LTLIBRARIES = libbancopg-@LIBBANCOPG_API_VERSION@.la
lib_LIBRARIES = libbancopg-@LIBBANCOPG_API_VERSION@.a

libbancopg_@LIBBANCOPG_API_VERSION@_ladir = $(includedir)
libbancopg_@LIBBANCOPG_API_VERSION@_adir = $(includedir)

libbancopg_@LIBBANCOPG_API_VERSION@_la_SOURCES = bancopg.C
libbancopg_@LIBBANCOPG_API_VERSION@_a_SOURCES = bancopg.C

libbancopg_@LIBBANCOPG_API_VERSION@_la_HEADERS = bancopg.h configbpg.h
libbancopg_@LIBBANCOPG_API_VERSION@_a_HEADERS = bancopg.h configbpg.h

libbancopg_@LIBBANCOPG_API_VERSION@_la_LDFLAGS = -version-info $(LIBBANCOPG_SO_VERSION) -no-undefined $(PG_LDFLAGS) -I$(PG_INCLUDE) $(LIBPQ_libs)

libbancopg_@LIBBANCOPG_API_VERSION@_la_CPPFLAGS = -I. -g -c -L. $(PG_CPPFLAGS) -I$(PG_INCLUDE)

libbancopg_@LIBBANCOPG_API_VERSION@_a_LIBADD = @LTLIBOBJS@

win32-dll:
	$(CXX) -I. -L. -shared -Wl,-soname,--out-implib,--enable-stdcall-fixup,.libs/libbancopg-@LIBBANCOPG_API_VERSION@.a -o libbancopg-@LIBBANCOPG_API_VERSION@.dll .libs/libbancopg_@LIBBANCOPG_API_VERSION@_la-bancopg.o $(PG_CPPFLAGS) -I$(PG_INCLUDE) $(LIBPQ_libs)
	
teste:
	$(CXX) -I$(top_srcdir)/src -o Testar $(top_srcdir)/teste/teste.C $(top_srcdir)/src/bancopg.C -I$(PG_INCLUDE) $(PG_CPPFLAGS) $(LIBPQ_libs)
